package com.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * 用户充值记录表
 */

@Data
@TableName("t_charge_record")
public class ChargeRecordEntity implements Serializable {


        @TableId(value = "pk_recordId", type = IdType.AUTO)
        private long recordId;

        @TableField("u_userRef")
        private long userNum;//用户唯一编号

        @TableField("u_name")
        private String name;//用户名

        @TableField("u_chargeMoney")
        private double money;//充值金额

        @TableField("u_chargeTime")
        private LocalDateTime chargeTime = LocalDateTime.now();//充值时间

        @TableField("u_balance")
        private double balance;//当前余额

        @TableField("u_totalMoney")
        private double totalMoney;//累计充值金额

        @TableField(exist = false)
        private UserEntity userEntity;//充值记录对应的用户
}
